package com.liuyucheng.designpattern.策略模式;

import com.liuyucheng.designpattern.策略模式.strategy.NewCustomerStrategy;
import com.liuyucheng.designpattern.策略模式.strategy.OldCustomerStrategy;

import java.math.BigDecimal;

public class Test {


    public static void main(String[] args) {
        Context context = new Context(new NewCustomerStrategy());
//        Context context = new Context(new OldCustomerStrategy());
        BigDecimal price = context.getPrice(new BigDecimal("100"));
        System.out.println("price = " + price);
    }
}
